@if (count($topics))
    @foreach ($topics as $index=>$topic)
        <div class="tt-item">
            {{--@if($index<3) tt-itemselect @endif--}}
            <div class="tt-col-avatar">
                <a href="{{ route('users.show', [$topic->user_id]) }}">
                    <img src="{{ $topic->user->avatar }}"
                         class="img-responsive img-circle" width="50px" height="50px" alt="{{ $topic->user->name }}">
                </a>
            </div>
            <div class="tt-col-description">
                <h6 class="tt-title"><a href="{{ $topic->link() }}" title="{{ $topic->title }}">
                        {{--<svg class="tt-icon">--}}
                        {{--<use xlink:href="#icon-pinned"></use>--}}
                        {{--</svg>--}}
                        {{ $topic->title }}
                    </a></h6>
                <div class="row align-items-center no-gutters">
                    <div class="col-11">
                        <ul class="tt-list-badge">
                            <li class="show-mobile"><a href="#"><span
                                            class="tt-color{{ add_zero($topic->category->id) }} tt-badge">{{ $topic->category->title }}</span></a></li>
                            <li><a href="{{ route('users.show', [$topic->user_id]) }}" title="{{ $topic->user->name }}"><span class="tt-color{{ add_zero($topic->category->id) }} tt-badge"><i class="fa fa-at"></i>{{ $topic->user->name }}</span></a></li>
                            {{--<li><a href="#"><span class="tt-badge">authors</span></a></li>--}}
                        </ul>
                    </div>
                    <div class="col-1 ml-auto show-mobile">
                        <div class="tt-value">1h</div>
                    </div>
                </div>
            </div>
            <div class="tt-col-category"><a href="{{ route('categories.show', $topic->category_id) }}" title="{{ $topic->category->name }}"><span class="tt-color{{ add_zero($topic->category->id) }} tt-badge">{{ $topic->category->name }}</span></a></div>
            <div class="tt-col-value hide-mobile">985</div>
            <div class="tt-col-value tt-color-select hide-mobile"><a href="{{ $topic->link() }}">{{ $topic->reply_count }} </a></div>
            <div class="tt-col-value hide-mobile">15.1k</div>
            <div class="tt-col-value hide-mobile">{{ $topic->updated_at->diffForHumans() }}</div>
        </div>

    @endforeach
@else
    <div class="empty-block">暂无数据 ~_~</div>
@endif